using System;
using Microsoft.SPOT;
using GHIElectronics.NETMF.USBHost;

namespace PTP.Usb.GHI
{
  public class USBH_PipeWrapper : IPipe
  {
    protected USBH_RawDevice.Pipe innerPipe;

    public USBH_PipeWrapper(USBH_RawDevice.Pipe innerPipe)
    {
      this.innerPipe = innerPipe;
    }

    public int PacketSize
    {
      get
      {
        return this.innerPipe.PipeEndpoint.wMaxPacketSize;
      }
    }

    #region IPipe Members

    public int TransferData(byte[] buffer, int offset, int count)
    {
      return this.innerPipe.TransferData(buffer, offset, count);
    }

    #endregion

    #region IDisposable Members

    public void Dispose()
    {
      
    }

    #endregion
  }
}
